MyUserPaneHitTestProc
NEW WITH THE APPEARANCE MANAGER
Returns the part code of the control that the point was in when the mouse-down event occurred.The Control Manager declares the type for an application-defined user pane hit test function as follows:
typedef pascal ControlPartCode (*ControlUserPaneHitTestProc) ( ControlHandle control, Point where);The Control Manager defines the data typeControlUserPaneHitTestUPP
to identify the universal procedure pointer for this application-defined function:
typedef UniversalProcPtr ControlUserPaneHitTestUPP;You typically use theNewControlUserPaneHitTestProc
macro like this:
ControlUserPaneHitTestUPP
myControlUserPaneHitTest
UPP;
myControlUserPaneHitTest
UPP =NewControlUserPaneHitTest
Proc
(MyUserPaneHitTest);You typically use the
CallControlUserPaneHitTestProc
macro like this:
CallControlUserPaneHitTest
Proc(myControlUserPaneHitTest
UPP, control, where);Here's how to declare the function
MyUserPaneHitTestProc:
pascal ControlPartCode MyUserPaneHitTestProc ( ControlHandle control, Point where);
control
- A handle to the control in which the mouse-down event occurred.
where
- The point, in a window's local coordinates, where the mouse-down event occurred.
- function result
- Returns the part code of the control where the mouse-down event occurred. If the point was not over a control, your function should return
kControlNoPart
.DISCUSSION
Once you have created the functionMyUserPaneHitTestProc
, passkControlUserPaneHitTestProcTag
in thetagName
parameter ofSetControlData
.